PluginGui{

	var parent, w, window, windowW = 200, windowH = 400, o;

	*new{|plugin|
		^super.new.init(plugin);
	}
	
	init{|plugin|
		var bounds;
		
		if(Ripple.mainWindow.notNil,
			{bounds = Rect(Ripple.getMainWindowBounds.left + 15, Ripple.getMainWindowBounds.top, windowW, windowH);},
			{bounds = Rect(300, 300, windowW, windowH);}
		
		);
		
		
		parent = plugin;
		
		window = FlowView.new(SCWindow.new('', bounds).front, Rect(0, 0, windowW, windowH));
		window.background_(MPGuiConstants.getBackground);
		window.decorator.gap_(0@0);
		window.decorator.margin_(0@0);
		
		{
			var contents;
		
			o = SCStaticText(window,windowW@20).string = ( " " + parent.class.asString );
			o.background_( RippleGuiConstants.getHeaderBarColor );
			
			contents = FlowView.new(window, bounds.width@(bounds.height - 20));
			contents.decorator.margin_(10@0);
			
			contents.decorator.nextLine;
			
			parent.getVals.keysValuesDo{|key,val|
	
				SpecControlView(contents, nil, key)
					.spec_(parent.getSpec(key))
					.value_(val)
					.action_({|control| parent.setValue(key, control.value)});
			
			}	
			
		}.value;
		
		
	}
	
	getFieldType{
		^EZSlider;
	}
	

}

TextPluginGui :  PluginGui{
	
	getFieldType{
		^SCTextField;
	}
	
}